home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / ABUSESRC.ZIP / AbuseSrc / abuse / src / net / sock.c
Encoding:
C/C++ Source or Header  |  1996-04-11  |  679 b   |  23 lines

  1. #include "sock.hpp"
  2. #include <stdlib.h>
  3.  
  4. const char notify_signature[] = "I wanna play ABUSE!";
  5. const char notify_response[] = "Yes!";
  6.  
  7. net_protocol *net_protocol::first=0;
  8.  
  9. // connect to an explictedly named address
  10. // first try to get the address and then try to connect
  11. // return NULL if either fail.  This method does not need to be implemented
  12. // in sub-classes
  13.  
  14. net_socket *net_protocol::connect_to_server(char *&server_name, int port, int force_port, net_socket::socket_type sock_type)
  15. {
  16.   net_address *a=get_node_address(server_name,port,force_port);
  17.   if (!a) return NULL;
  18.   net_socket *s=connect_to_server(a,sock_type);
  19.   delete a;
  20.   return s;
  21. }
  22.  
  23.